package com.cat.dynamicPlanning02;

/**
 * @author 曲大人的喵
 * @description https://leetcode.cn/problems/escape-the-ghosts/
 * @create 2025/11/4 10:26
 * @since JDK17
 */

class Solution28 {
    public boolean escapeGhosts(int[][] ghosts, int[] target) {
        int t = Math.abs(target[0]) + Math.abs(target[1]);
        for (int[] p : ghosts) {
            if (Math.abs(p[0] - target[0]) + Math.abs(p[1] - target[1]) <= t) {
                return false;
            }
        }
        return true;
    }
}